This directory contains R-code files for the following paper:
West, Jeremy, Robert W. Fairlie, Bryan Pratt, and Liam Rose (2021). "Automated Enforcement of Irrigation Regulations and Social Pressure for Water Conservation." Journal of the Association of Environmental and Resource Economists.

This study relies on proprietary administrative data on water use from a water utility in Southern California (Burbank Water & Power). Although the data are confidential and restricted-access, a request can be made to obtain the data from WaterSmart Software in San Francisco, CA (www.watersmart.com). Here, we provide all programming code files used in the analyses.

There are four text R-code files:

1_BG_DataPrep.R ---- This code file processes the "raw" data provided by WaterSmart Software for Burbank Water & Power. It also processes data for Glendale Water & Power (not used in this study).

2_PrepareSample.R ---- This code file uses the resulting data from 1_BG_DataPrep.R to form the analysis files that are used to generate the tables and figures for the paper. 

3_Figures.R ---- This code file uses the prepared analysis data to generate all figures for the paper.

4_Tables.R ---- This code file uses the prepared analysis data to generate all tables for the paper. 

Additional detail about various decisions and data processing is included in each of the code files.






